package com.wellsoft.mobileoa;

import android.content.Intent;
import android.gesture.GestureOverlayView;
import android.gesture.GestureOverlayView.OnGestureListener;
import android.os.Bundle;
import android.view.MotionEvent;

import com.wellsoft.mobileoa.utils.BaseActivity;
import com.wellsoft.mobileoa.utils.BaseView;
import com.wellsoft.mobileoa.wsmodel.WSOA_Page;

public class FuncPageActivity extends BaseActivity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		Intent intent = getIntent();
		url = intent.getStringExtra("url");
		page = (WSOA_Page)intent.getSerializableExtra("page");

		// 定义一个要展示View
		// 先根据入参数据确定好要生成的BaseView子类
		baseView = BaseView.CreateBaseViewFactory(this, page, url);
		// 使用BaseView子类将要显示的View内容生成，使用DrawSelf方法
		viewGroup = baseView.DrawSelf();
		if (viewGroup == null) {
			return;
		}

		// 将要显示的内容放入setContentView
		setContentView(viewGroup);
	}
}
